This invention relates generally to a system and method for storing data on computers connected by a network, such as the Internet and in particular to a caching system and method for reducing the data traffic and problems associated with network storage systems.
Typical enterprise applications that run on today""s Internet environment generally need to draw large amounts of data from either local or remote corporate data centers through geographically dispersed networks (e.g. Local Area Networks, Wide Area Networks, etc.). In many cases, this data traffic must share the network bandwidth with all other traffic on the network, making the delivery of data very much susceptible to network congestion. Caching is a technique of mapping frequently used data from a slow storage device, in which it is typically stored, to a higher speed storage device to achieve data access performance gains since the data can be more rapidly accessed from the higher speed storage device. Extending this concept in a network environment for remote data sources, it is possible to map the remote data into a local cache which is near the requesting host device in order to decrease/eliminate the delay due to network traffic congestion.
The greatest challenge associated with using caches is ensuring data coherency, i.e. to make sure that the data in the cache are always the same as the data stored in the target storage device. For static data, there are no such concerns because the data in the target storage device stays the same so that the data in all caches extracted from the original data will always be the same as the original. However, in real-world situations, data usually gets updated frequently, making it necessary for the caches to either refresh themselves frequently to obtain the current data or to invalidate the data stored in the cache so that applications reading from the cache will not get xe2x80x9cstalexe2x80x9d (e.g., invalid) data from the cache.
Currently in the industry, there exist several cache mechanisms and architectures for improving the performance of data retrieval from remote storage devices. These include storage subsystems (e.g. RAID controllers) in a storage network environment, web caches in implemented within web browsers, and web cache appliances. Each of these cache mechanisms are designed to improve data retrieval performance for their specific applications.
In storage networks (e.g. Fibre Channel networks), any number of hosts read and write data to storage subsystems (e.g. RAID controllers) across the network. Storage subsystems attached to these storage networks implement cache memory either inside the storage devices (i.e. disk drives) or on the subsystem controller cards. In both cases, they usually have very limited amounts of cache storage space installed. Moreover, these kinds of caches may not help the overall performance much if the transmission latency between the storage subsystem and the requesting host is large, as usually is the case in large geographically dispersed networked environments.
On the other hand, the web page caching mechanism implemented in the web browsers on individual client machines stores a copy of requested data locally. This kind of cache system has two problems: the first one is that the cached data is a snap shot of the data at the time it is being cached and thus afterwards it has no way of knowing if the data in the original storage device has been updated; secondly, the same data gets cached in many client machines making it an inefficient mechanism for general applications. This approach deals with managing the web page cache memory inside the client machines while they access web pages from Internet web servers. However, web page access represents only a special class of application where occasional stale data is not a significant issue for most users. Users usually manually force the browser to ignore the data in the cache and go to the target web server for the updated data directly. Obviously, this approach cannot be applied to most other applications where data integrity and coherency are important like in real-time transaction based applications.
Another web caching mechanism used in the industry are web caching appliances. These devices are typically inserted in the network near the web clients. All web transactions pass through the web cache and if the web page accessed is not found in the web cache, the appliance forwards the web request to the originally intended web server. When the web server responds, the web cache will cache the reply for later queries to the same web objects by the same or different web clients. Using this mechanism, if the web cache is local and the web servers are remote, then web accesses can be satisfied in a much more timely manner. In addition, the web cache is made available to all web clients local to the cache appliance. The drawback of this approach is that is specific to web access and not to more generic storage access methods (file or block).
Other suggested cache mechanisms propose ways of increasing the cache hit rate by intelligently pre-fetching data into cache memory during low processing and/or network activity periods. These proposed schemes obviously work better for some applications like web page access and other sequential data access applications. Other cache mechanisms have developed complex schemes to manage distributed cache systems on local networks, which are difficult to configure and manage Their implementation may be efficient when both the requesting hosts and target devices are located in the same local network. However, when the requesting hosts and the target devices are geographically separated as in the Internet environment, their distributed cache scheme implementation may not always produce the desired performance gains due to the data transmission latency across wide area networks.
All of the cache mechanisms described above have several drawbacks in light of the goal to provide a generic but highly efficient file and block storage data cache mechanism for geographically dispersed networks. It is desirable to provide a high performance, efficient cache system and method for network storage and it is to this end that the present invention is directed.
The caching system and method built in accordance with this invention overcomes the above problems and limitations of existing cache systems. This invention addresses all of these problems by implementing a cache in the network near the storage devices and another cache in the network near the requesting hosts. Thus, frequently accessed data from a group of storage devices are cached in the system deployed near the storage subsystems. In addition, data frequently accessed by a group of hosts/clients are cached in the system deployed near the requesting host devices. This invention allows a network of arbitrary size to exist in between the host-side cache system and the storage-side cache system.
The cache systems are implemented in a manner that allows the most efficient processing of read requests to occur. Each read request initiated by a host would first be checked against the cached data in host-side cache system and be satisfied by that system if the requested data is present. If the host-side cache could not satisfy the read request, the read request is sent out to the storage-side cache. If a cache hit occurs at the storage-side cache system, the read request is satisfied by that system. If both cache systems fail to generate a cache hit for the read request then the request is forwarded to the target storage device to satisfy the read request. Thus, the slow access-time target storage device is only accessed to satisfy a read request if both the host-side cache system and the storage-side cache system cannot satisfy the read request. Thus, network traffic is reduced if a host-side cache hit occurs or target storage latency is reduced if the storage-side cache hit occurs. In the case where both caches do not contain the data, when the data is transmitted from the target storage device back to the initiating host, the data would preferably pass through and be stored in both the host-side cache as well as the storage-side cache for future use.
The caching system does not support separate write cache. However, when a write request occurs, the system on the storage side will use the written data to refresh its cache and the cache system on the host side will either use the data to refresh its cache or to simply invalidate the same data in the cache if it was already there. Moreover, the system on the host side will work with all other cache systems on the network that are on the same access zone to do the same update or invalidation operations for their caches.
Because of the way the cache systems may be deployed, the cache systems may be installed in strategic distributed locations throughout any arbitrary network between any hosts requesting data and any target storage devices providing the data. This network may be composed of local area networks (LANs), metropolitan area networks (MANs), wide area networks (WANs), storage area networks (SANs), or any combination of these network types. Therefore, regardless of the physical locations of the requesting hosts or the target devices, the two system caches on the data path between the requesting host and the target device in accordance with the invention will greatly increase the chance of being able to serve the requests with reduced network traffic and/or decreased access latency.
In accordance with a preferred embodiment of the invention, a special cache/SCSI card may be used to provide the cache. In particular, this card may have a large amount (4 Gbytes or more) of volatile memory (e.g. DRAM, SDRAM, RDRAM, etc.) installed to serve as primary cache storage and multiple disk drives (e.g. SCSI, ATA, IDE, etc.) may also be attached directly to the card to serve as secondary cache storage. A cache manager software program may be executed by a processor on this card and the manager may monitor the data traffic through the system and manage the local cache. The cache manager program also communicates with other cache managers running on the network to perform cache update or invalidation functions as described above.
At the target storage device side, a cache system keeps a large cache for all attached storage devices in the local storage network. Data requests from outside the local storage network can potentially be satisfied by drawing data from the cache and avoiding local accesses to the local storage devices. At the other end of the intermediate geographically dispersed network, another large cache is kept in the cache system for storing data that have been accessed by all local hosts in the past. Thus, future read requests for the same data will be satisfied by this cache system thereby totally eliminating traffic over the intermediate network.
Cache data invalidation, in accordance with this invention, may be initiated when one cache system detects a write request. The cache manager program automatically sends out messages to all other cache systems on the network for their cache managers to check and invalidate the blocks of data being stored in originator""s cache. When writing a small amount of data, instead of invalidating the system caches on the network, it might be more efficient to just update those caches with the data. The cache system allows users to set a threshold value so that when the amount of data being written is smaller than that threshold value, the system may perform a cache update otherwise it may perform cache invalidation for all cache systems on the network.
For network attached storage (NAS) devices where data is accessed as network files rather than simply blocks of data, the cache system can also cache them in file-based caches the same way as other block-based caches.
In accordance with the invention, the cache system may be connected to zero or more hosts and/or zero or more targets. Depending of the targets and hosts connected to the cache system, the memory of the cache system is then appropriately partitioned. For example, a cache system that is connected to only target devices may have its memory configured as an SSC, a cache system that is connected to only host computers may have its memory configured as an HSC and a cache system that is connected to both hosts and targets may have its memory configured to be both an HSC and an SSC.
Thus, in accordance with the invention, a cache system is provided. The cache system comprises an arbitrary communications network and two or more cache systems connected to the communications network wherein each cache system is connected to at least one computer host or one storage device. Each cache system further comprises a first cache for servicing data requests for data stored on the storage devices associated with the cache system, a second cache for servicing data requests from computer hosts associated with the cache system and a cache manager for controlling the operation of the first and second caches.
In accordance with another aspect of the invention, a method for caching data being transferred between a first cache system and a second cache system connected together by a communications network is provided wherein the first and second cache systems each have at least one storage device and at least one computer host attached to them, and each cache system contains a storage device cache and a computer host cache. A computer host cache of the first cache system is checked upon receiving a read request from the computer host associated with the first cache system for data from the storage device of the second cache system to determine if the requested data is in the computer host cache. If the data is not in the computer host cache of the first cache system, the request is forwarded to the second cache system where the storage device cache is checked to determine if the requested data is in the storage device cache.
In accordance with another aspect of the invention, a method for caching data being transferred between a first cache system and a second cache system connected together by a computer network is provided wherein the first and second cache systems each have at least one storage device and at least one computer host attached to them, and each cache system contains a storage device cache and a computer host cache. The computer host cache of the first cache system is changed upon receiving a write request from the computer host associated with the first cache system to write data to the storage device of the second cache system. A message is sent to all of the computer host caches to change the computer host cache with the same data as the computer host cache of the first cache system or to invalidate the data in the cache. The storage device cache of the second cache system is then changed in response to the write request.
In accordance with yet another aspect of the invention, a cache unit for caching data between a computer host and a storage device is provided. The cache unit comprises a computer host cache for caching data requested by the computer host, a storage device cache for caching data stored on the storage device, and a cache controller for servicing the read and write requests from the computer host for data located on the storage device.